-
Notifications
You must be signed in to change notification settings - Fork 10.4k
QuickGrid: Adds Multi Column Sorting #62604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
-Adds Multi column sorting capability -Exposes SortColumns so that individual columns can easily apply their own logic based on whether or not they're currently being sorted by. Use cases like swapping an icon out in markup, changing available options, etc.
Thanks for your PR, @@los93sol. Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
Adds null check to sortColumn.Column in GetSortByProperties
src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src/PublicAPI.Shipped.txt
Outdated
Show resolved
Hide resolved
… and return the value out of that
Just checking if anything is needed on my side to keep this moving? |
@los93sol, from what I understood, yes. You should create a separate issue describing this change and why it’s needed. Right now, we have one shared issue that covers several changes, but it has already been closed. Going forward, please create a new issue for each feature you’d like to propose (one feature per issue). This will help us handle your request more smoothly through the usual community change process. |
@ilonatommy I've created the issue for this one, hopefully that's enough to get some traction going. Next time I'll break the issue down further ahead of time. |
QuickGrid: Adds Multi Column Sorting
Description
This pull request adds multi column sorting capabilities to QuickGrid. AddUpdateSortByColumnAsync can be called by columns to append or change the sort direction of an existing sorted column. For EF implementations multi column sorting is handled automatically. The existing SortByColumnAsync method clears all other columns and simply flips the direction of the column that was clicked. This enables users to, for example, specify ctrl+click appends the column and a normal click clears other columns and allows for things like ColumnOptions to be used so the default single column sorting functionality is maintained, but the underlying capability is now included in the box to support multiple column sorting.
Additionally, this PR exposes the SortColumns so individual columns can easily apply this logic and benefit from additional functionality like making it trivial to swap an icon out based on it's current sort state independent of the aria tags on the tr itself since that's much more difficult to get at in those cases.
Fixes #62494